<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link th:replace="fragments/dependency :: list-css">

<title>优铺Admin</title>
</head>

<body class="nav-md">
	<div class="container body">
		<div class="main_container">
			<!-- Left Menu -->
			<div th:replace="fragments/leftMenu :: leftMenu"></div>

			<!-- top navigation -->
			<div th:replace="fragments/header :: header"></div>


			<!-- page content -->
			<div class="right_col" role="main">
				<div class="ln_solid"></div>
				<div class="col-md-12 col-sm-12 col-xs-12">
					<div class="x_panel">
						<div class="x_title">
							<h2>报名信息</h2>
							<ul class="nav navbar-right panel_toolbox">
								<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
							</ul>
							<div class="clearfix"></div>
						</div>
						<!-- 搜索区域 -->
						<div class="x_content">
							<button type="button" class="btn btn-round btn-default" name="returnList" >返回文章列表</button>
							<button type="button" class="btn btn-round btn-success hide" name="export" permission-rel="/articleApply/exportList">导出为EXCEL</button>
						</div>
						<div class="x_content">
							<div class="table-responsive">
								<input type="hidden" name="articleId" th:value="${articleId}">
								<table class="table table-striped jambo_table bulk_action">
									<thead>
										<tr class="headings">
											<th class="column-title">序号</th>
											<th class="column-title">姓名</th>
											<th class="column-title">公司</th>
											<th class="column-title">职务</th>
											<th class="column-title">电话</th>
											<th class="column-title">备注</th>
											<th class="column-title">报名时间</th>
										</tr>
									</thead>
									<tbody>
										<tr class="even pointer" th:each="entity,entityStat : ${pageList}">
											<td th:text="${entityStat.index+1}"></td>
											<td th:text="${entity.user?.name}"></td>
											<td th:text="${entity.user?.companyName}"></td>
											<td th:text="${entity.user?.positionName}"></td>
											<td th:text="${entity.user?.account}"></td>
											<td th:text="${entity.remark}"></td>
											<td th:text="${#dates.format(entity.createTime, 'yyyy/MM/dd HH:mm:ss')}"></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="x_title">
							<div class="clearfix"></div>
						</div>
						<div class="x_content"></div>
					</div>
				</div>
				<div th:replace="fragments/page :: page"></div>
			</div>

			<!-- footer content -->
			<div th:replace="fragments/footer :: footer"></div>
		</div>
	</div>

	<div th:replace="fragments/dependency :: list-js"></div>

	<script type="text/javascript">
		var list = {
			baseUrl : "articleApply",
			area : [ '60%', '90%' ],
			init : function() {
				$('button[name=returnList]').bind('click',list.returnList);
				$('button[name=query]').bind('click', function() {
					window.location.href = list.query();
				});
				$('button[name=export]').bind('click', function() {
					var articleId = $("input[name=articleId]").val();
					if(articleId){
						window.location.href = '/' + list.baseUrl + '/exportList?articleId='+articleId;
					}else{
						adminLayer.alert({
							content : '请选择要导出的数据',
							yes : function() {
							},
							end : function() {

							}
						});
					}
					
				});
			},
			returnList:function(){
				window.location.href="/article/list";
			},
			query : function() {
				pageFoot.searchUrl = '/' + list.baseUrl + '/list';
				return pageFoot.searchUrl;
			}
		}
		pageFoot.getCurrentUrl = function() {
			return list.query();
		}
		pageFoot.init();
		list.init();

		//开始时间控件初始化
		$('#myDatepicker0').datetimepicker({
			ignoreReadonly : true,
			allowInputToggle : true,
			format : 'YYYY/MM/DD'
		});
		//结束时间控件初始化
		$('#myDatepicker1').datetimepicker({
			ignoreReadonly : true,
			allowInputToggle : true,
			format : 'YYYY/MM/DD'
		});
	</script>
</body>
</html>
